package com.qianyu.versioncontrolapi.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qianyu.versioncontrolapi.service.OptionLogService;
import com.qianyu.versioncontrolcore.entity.base.PageDTO;
import com.qianyu.versioncontrolcore.entity.base.Result;
import com.qianyu.versioncontrolcore.entity.bean.OptionLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "日志查询",description = "wangzhicheng")
@RequiredArgsConstructor
@RequestMapping("/log")
public class OptionLogController {

    private final OptionLogService optionLogService;

    /**
     * 分页查询日志
     */
    @ApiOperation(value = "分页查询日志")
    @PostMapping("/pageList")
    Result<Page<OptionLog>> pageList(@RequestBody @Validated PageDTO dto){
        return Result.success(optionLogService.pageList(dto));
    }

}
